package com.lou.springboot.utils;

public class PasswordUtils {
    public static String generateRandomNumber(Integer length) {
        if (length < 1) length = 1;
        int num = (int)Math.pow(10, (double)(length - 1));
        int newNum = (int)((Math.random() *9+1) * num);
        return String.valueOf(newNum);
    }
}
